﻿@{
    ViewBag.Title = "Xử lý tài liệu";
    Layout = "~/Views/Shared/_Layout.Management.cshtml";
}


<!-- Dasboard -->
<h2 class="app">
	<strong>Xử lý tài liệu</strong>
</h2>                
<div id="zoneCal" >
    <ul class="accordeon-tabs mod-lead-flow">
        <li class="open">
            <span class="tab">
                <span id="expDashboardEvent" class="expander" data-bind="click: expEvent"></span>
                <span>Các tài liệu chưa xử lý: </span>
                <span data-bind="text: TotalProduct"></span> tài liệu
                <span style="margin-top:5px; float:right; position:relative; right:10px;">
                    <a href="##" data-bind="click: ApproveAll, visible: Products().length > 0">Xác nhận tất cả &raquo;</a>
                </span>
            </span>
            <span class="panel nopadding" data-bind="visible: visiblepanel">
                <div class="scroll" style="height: 266px; overflow: auto;">                
                    <table class="tablegrid tableflow" cellpadding="0" cellspacing="0">
                        <thead>                    
      			            <tr class="title">
      				            <th>Tên tài liệu</th>
      				            <th class="datetime">Ref ID#</th>
      				            <th class="datetime aligncenter">Ngày tạo</th>
      				            <th class="date aligncenter">Xem</th>
      				            <th class="active aligncenter">Xác nhận</th>
      			            </tr>
                        </thead>
                        <tbody data-bind="foreach: Products">    
        			        <tr class="line">
        				        <td style="font-weight:bold" data-bind='text: Title'></td>
        				        <td data-bind='text: ID'></td>
        				        <td data-bind='text: CreationDate'></td>
                                <td class="date">                                
                                    <a class="various" data-fancybox-type="iframe" href="#" title="Xem" data-bind='attr: {href: "/Management/ProductList/Preview/" + ID}'>Xem</a>
                                </td>
        				        <td class="colaction">
                                    <a class="btn btn-editpen" href="#" title="Xác nhận hiển thị" data-bind='click: $parent.setProduct'>Edit</a>
                                    <a class="btn btn-x delete" href="#cfmDelete" title="Xóa" data-bind='attr: {id: "product" + ID, rel: Title, onclick: "DeleteDialog(" + ID + ")"}'>Delete</a>
                                </td>
      			            </tr>
                        </tbody>
      		        </table>
                </div>
            </span>
        </li>
    </ul>
        
    @Html.Partial("_PartialConfirmDeleted")
</div>

<!-- Product Approval -->
<div id="zoneFlow">
    <ul class="accordeon-tabs mod-lead-flow">
        <li class="open">
            <span class="tab">
                <span id="expDashboardFlow" class="expander" data-bind="click: expFlow"></span>
                <span>Theo dõi tài liệu</span>

                <span class="tab-right first">
                    Đã cập nhật <label data-bind="text:TimeUpdate" ></label>
                </span>
            </span>
            <span class="toolbar" data-bind="visible: visibletoolbar">
                <span class="area button current">
                    <a href="javascript:void(0);">Xem tài liệu đã xử lý
                        <span class="arr"></span>
                    </a>
                </span>
            </span>
            <span class="panel nopadding" data-bind="visible: visibleflow">
                <div class="scroll" style="height: 266px; overflow: auto;">                
                    <table class="tablegrid tableflow" cellpadding="0" cellspacing="0">
                        <thead>                    
      			            <tr class="title">
      				            <th>Tên tài liệu</th>
      				            <th class="datetime aligncenter">Ngày tạo</th>
      				            <th class="datetime aligncenter">Tình trạng</th>
      			            </tr>
                        </thead>
                        <tbody data-bind="foreach: ProductApproved">    
        			        <tr class="line">
        				        <td data-bind='text: Title' ></td>
        				        <td data-bind='text: CreationDate'></td>
        				        <td data-bind='text: "Kích hoạt"'></td>
      			            </tr>
                        </tbody>
      		        </table>
                </div>
            </span>
        </li>
    </ul>  
</div>

<script type="text/javascript">
    var data = @(Html.Raw(Json.Encode(Model)));    
</script>
<script src="/Scripts/Product/ProductDasboardViewModel.js" type="text/javascript"></script>
